package com.CST.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.alibaba.excel.annotation.ExcelProperty;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @author ly
 * @since 2021-09-23
 */
@ApiModel(value ="核算科室")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("BD_Department")
public class BdDepartment implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "ID",type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "科室编号")
    @ExcelProperty(value = "DeptCode")
    @TableField("DeptCode")
    private String deptCode;

    @ApiModelProperty(value = "科室名称")
    @ExcelProperty(value = "DeptName")
    @TableField("DeptName")
    private String deptName;

    @ApiModelProperty(value = "父级编号")
    @ExcelProperty(value = "ParentCode")
    @TableField("ParentCode")
    private String parentCode;

    @ApiModelProperty(value = "核算对应编号")
    @ExcelProperty(value = "AccountCode")
    @TableField("AccountCode")
    private Integer accountCode;

    @ApiModelProperty(value = "所属项目ID")
    @ExcelProperty(value = "ProjectID")
    @TableField("ProjectID")
    private Integer projectId;

    @ApiModelProperty(value = "序号")
    @ExcelProperty(value = "Seq")
    @TableField("Seq")
    private Integer seq;

    @ApiModelProperty(value = "科室类型ID")
    @ExcelProperty(value = "DeptTypeID")
    @TableField("DeptTypeID")
    private String deptTypeId;

    @ApiModelProperty(value = "科室类型")
    @ExcelProperty(value = "DeptTypeName")
    @TableField("DeptTypeName")
    private String deptTypeName;

    @ApiModelProperty(value = "科室属性 BD_DeptProperty")
    @ExcelProperty(value = "DeptPropertyID")
    @TableField("DeptPropertyID")
    private String deptPropertyId;

    @ApiModelProperty(value = "科室属性")
    @ExcelProperty(value = "DeptPropertyName")
    @TableField("DeptPropertyName")
    private String deptPropertyName;

    @ApiModelProperty(value = "临床属性BD_Clinical")
    @ExcelProperty(value = "ClinicalPropertyID")
    @TableField("ClinicalPropertyID")
    private String clinicalPropertyId;

    @ApiModelProperty(value = "临床属性")
    @ExcelProperty(value = "ClinicalPropertyName")
    @TableField("ClinicalPropertyName")
    private String clinicalPropertyName;

    @ApiModelProperty(value = "是否往来账标识")
    @ExcelProperty(value = "IsCurrAccount")
    @TableField("IsCurrAccount")
    private String isCurrAccount;

    @ApiModelProperty(value = "系统id")
    @ExcelProperty(value = "SysID")
    @TableField("SysID")
    private String sysId;

    @ApiModelProperty(value = "系统名称")
    @ExcelProperty(value = "SysName")
    @TableField("SysName")
    private String sysName;


    @ApiModelProperty(value = "是否有效(0有效 1无效)")
    @ExcelProperty(value = "RowStatus")
    @TableField("RowStatus")
    private String rowStatus;

    @ApiModelProperty(value = "创建人")
    @ExcelProperty(value = "CreatedBy")
    @TableField("CreatedBy")
    private String createdBy;

    @ApiModelProperty(value = "创建时间",example = "2020-02-05 13:30:41")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @ExcelProperty(value = "CreatedOn")
    @TableField("CreatedOn")
    private String createdOn;

    @ApiModelProperty(value = "修改人")
    @ExcelProperty(value = "UpdatedBy")
    @TableField("UpdatedBy")
    private String updatedBy;

    @ApiModelProperty(value = "修改时间",example = "2020-02-05 13:30:41")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @ExcelProperty(value = "UpdatedOn")
    @TableField("UpdatedOn")
    private String updatedOn;

    @ApiModelProperty(value = "备注")
    @ExcelProperty(value = "Remark")
    @TableField("Remark")
    private String remark;

    @ApiModelProperty(value = "是否为叶子节点")
    @ExcelProperty(value = "isLeaf")
    @TableField("isLeaf")
    private Integer isLeaf;

    @TableField(exist = false)
    @ApiModelProperty("是否父级")
    private Boolean isParent;


    @TableField(exist = false)
    @ApiModelProperty("子级科室")
    private List<BdDepartment> childrens =new ArrayList<>();

    @TableField(exist = false)
    @ApiModelProperty(value = "是否模糊查询")
    private Boolean isLike;

    @TableField(exist = false)
    @ApiModelProperty(value = "关联状态")
    private Boolean isRelation;



}
